﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data.SqlClient;
using cwtrock.model;
using cwtrock.util;
using System.Data;
using cwtrock.dao.impl;

namespace cwtrock.service.impl
{
    class SysUsrServiceImpl
    {

        SysUsrDaoImpl sysUsrDaoImpl = new SysUsrDaoImpl();


        public SysUsr login(SysUsr usr)
        {
            try
            {

                return sysUsrDaoImpl.getUsrByIdAndPwd(usr);

            }
            catch (Exception e)
            {
                throw e;
                return null;
            }
        }


        public SysUsr getLogUsrByUserId(string usrid)
        {
            return sysUsrDaoImpl.getUserByUserid(usrid);
        }


        public void modUserPwd(string userid, string pwd,string  usrname)
        {
            sysUsrDaoImpl.updatePwd(userid, pwd,usrname);

        }



    }
}
